package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Vector;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class AppendAllElementsOfAnotherCollectionToArrayListUsingAddAllMethod {
	public static void main(String[] args) {

		ArrayList<String> arrayList = new ArrayList<>();

		arrayList.add("1");
		arrayList.add("2");
		arrayList.add("3");
		System.out.println("追加前:" + arrayList);
		Vector v = new Vector();
		v.add("4");
		v.add("5");
		arrayList.addAll(v);
		System.out.println("追加后:" + arrayList);
	}
}
